package com.example.lte.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * @author lzh
 * @date 2020/11/2 - 15:53
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "operation_log")
public class OperationLogEntity {
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    private Long id;

    @Column(length = 255)
    private String reqUrl;

    @Column(length = 200)
    private String reqIp;

    @Column(length = 300)
    private String reqToken;

    @Column(length = 300)
    private String reqLocation;

    @Column(length = 100)
    private String account;

    @Column(length = 125)
    private String businessUnit;

    @Column(length = 125)
    private String businessMethod;


    @CreationTimestamp
    @Column(name = "add_time", columnDefinition = "DATETIME COMMENT '添加时间'")
    private Timestamp addTime;



}
